package pta.test0607.统计一篇英文文章中不重复单词的个数;

import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<>();
        while(true){
            String str = sc.next().toLowerCase();
            if(str.equals("!!!!!")) break;
            if(!list.contains(str)){
                list.add(str);
            }
        }
        System.out.println(list.size());
    }
}
